<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="s"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://www.springframework.org/security/tags" prefix="security"%>
<form:form class="form" method="post" modelAttribute="trackForm">
	<h2 class="form-heading">Add new track</h2>
	<form:errors path="" element="p" class="text-error" />
	
	
	<form:input path="firstName" class="input-block-level" placeholder="First Name" />
	<form:errors path="firstName" element="p" class="text-error"/>
	<form:input path="lastName" class="input-block-level" placeholder="Last Name" />
	<form:errors path="lastName" element="p" class="text-error"/>
	
	<form:input path="from" class="input-block-level" placeholder="From" />
	<form:errors path="from" element="p" class="text-error"/>
	<form:input path="to" class="input-block-level" placeholder="To" />
	<form:errors path="to" element="p" class="text-error"/>
	<form:input path="seats" class="input-block-level" placeholder="Seats" />
	<form:errors path="seats" element="p" class="text-error"/>
	
	<form:input path="skype" class="input-block-level" placeholder="Skype" />
	<form:input path="phone" class="input-block-level" placeholder="Telephone" />
	
	<input type="hidden" name="authType" id="authType"/>
	<security:authorize access="!isAuthenticated()">
		<button class="btn btn-large btn-primary" type="submit" 
			onclick="document.getElementById('authType').value='fb';">Facebook</button>
		<button class="btn btn-large btn-primary" type="submit" 
			onclick="document.getElementById('authType').value='email';">Email</button>
	</security:authorize>
	<security:authorize access="isAuthenticated()">
		<button class="btn btn-large btn-primary" type="submit">Proceed</button>
	</security:authorize>
</form:form>